//
//  NetWorkManager.m
//  EasyJie
//
//  Created by easy120 on 15/6/12.
//  Copyright (c) 2015年 easy120. All rights reserved.
//

#import "NetWorkManager.h"
#import "EZRequest.h"

@interface NetWorkManager()


@end

@implementation NetWorkManager

+(instancetype)shareManager:(NSURL *)baseURL {
        static NetWorkManager *tools;
        
        static dispatch_once_t onceToken;
        dispatch_once(&onceToken, ^{

            NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
            
            tools = [[self alloc] initWithBaseURL:baseURL sessionConfiguration:config];
            
            // 扩展响应 JSON 反序列化支持的类型
            tools.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", @"text/html", nil];
        });
        
        return tools;
}


@end
